import request from "@/request/";

//分页
export const getList = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/page",
    method: "POST",
    data,
  });
};

//保存设备点检计划
export const savePlan = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/save",
    method: "POST",
    data,
  });
};

//删除设备点检计划
export const removePlan = (idList) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/remove",
    method: "POST",
    data: {
      idList,
    },
  });
};
//编辑/新增设备点检项列表
export const getPopupCheckList = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/item/page",
    method: "POST",
    data,
  });
};
//设备点检计划详情
export const getDetail = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/main/detail",
    method: "POST",
    data,
  });
};
//查看设备点检项目列表
export const getdetailTableData = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/item/page",
    method: "POST",
    data,
  });
};
//启用停用
export const getIsEnabledHandle = (data) => {
  return request({
    url: "/api/mes-equipment-service/check/plan/state/change",
    method: "POST",
    data,
  });
};
